#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QTreeWidgetItem>
#include <QTimer>

#include "mqclient61850.h"

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:
    void on_action_2_triggered();

    void on_action_3_triggered();

    void on_action_autoUpdate_toggled(bool arg1);

    void on_actionwrite1_triggered();

private:
    Ui::MainWindow *ui;
    MQClient61850 *m_mqClient61850;
    QTimer *m_timerPeriodRead;

    void DealFcdaToTree(QTreeWidgetItem *t_treeWi, _61850_FCDA_ t_fcda);
    void DealDaToTree(QTreeWidgetItem *t_treeWi, _61850_DA_ t_fcda);

    void UpdateVal();
};
#endif // MAINWINDOW_H
